using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Text;
using System.Windows.Forms;

namespace GSNConf.Senders.ConfigControls
{
    public partial class ICQSMSSenderConfigControl : UserControl
    {
        public ICQSMSSenderConfigControl()
        {
            InitializeComponent();
        }

        private void txtIcqUin_Validating(object sender, CancelEventArgs e)
        {
            if (txtIcqUin.Text.Trim().Length == 0)
            {
                MessageBox.Show("Please enter ICQ#.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                e.Cancel = true;
                //txtIcqUin.Focus();
            }
        }

        private void txtIcqPassword_Validating(object sender, CancelEventArgs e)
        {
            if (txtIcqPassword.Text.Trim().Length == 0)
            {
                MessageBox.Show("Please enter ICQ password.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                e.Cancel = true;
                //txtIcqPassword.Focus();
            }
        }

        private void txtIcqServer_Validating(object sender, CancelEventArgs e)
        {
            if (txtIcqServer.Text.Trim().Length == 0)
            {
                txtIcqServer.Text = "login.icq.com"; //put default
            }
        }

        private void txtIcqPort_Validating(object sender, CancelEventArgs e)
        {
            if (txtIcqPort.Text.Length == 0)
            {
                txtIcqPort.Text = "5190"; // default
            }
        }
    }
}
